/**
 * 
 */
package by.imotaeva.printing_services.datamodel;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MapsId;
import javax.persistence.OneToOne;

/**
 * @author Inna
 *
 */
@Entity
public class BlankOrder {

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id;

	@MapsId
	@OneToOne(fetch = FetchType.LAZY, optional = false, cascade = {
			CascadeType.PERSIST, CascadeType.MERGE })
	@JoinColumn(updatable = false, name = "id")
	private PrintingProductOrder printingProductOrder;

	@Column
	private String colorfulness;

	@ManyToOne(fetch = FetchType.LAZY, targetEntity = Paper.class)
	private Paper paper;

	@Column
	private Double amountPaper;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public PrintingProductOrder getPrintingProductOrder() {
		return printingProductOrder;
	}

	public void setPrintingProductOrder(
			PrintingProductOrder printingProductOrder) {
		this.printingProductOrder = printingProductOrder;
	}

	public String getColorfulness() {
		return colorfulness;
	}

	public void setColorfulness(String colorfulness) {
		this.colorfulness = colorfulness;
	}

	public Paper getPaper() {
		return paper;
	}

	public void setPaper(Paper paper) {
		this.paper = paper;
	}

	public Double getAmountPaper() {
		return amountPaper;
	}

	public void setAmountPaper(Double amountPaper) {
		this.amountPaper = amountPaper;
	}

}
